#ifndef PENG_KEYBOARD_KEYBOARD_DRIVER_H
#define PENG_KEYBOARD_KEYBOARD_DRIVER_H


#define Control_Key 0x00
#define xxCK Control_Key

#define Special_Key 0x00
#define xxSK Special_Key

typedef enum
{
    KEYUNPRESSED= 0,
    KEYPRESSED  = ~KEYUNPRESSED
}KeyState_enumTypedef;

typedef struct
{
    unsigned char ATKeyData;
    unsigned char ROW_N;
    unsigned char COL_N;
    unsigned char Index;
}AT_KEYDATA_Structure_Typedef;

typedef struct
{
    uint8_t I;
    uint8_t J;
    uint8_t Num;
    uint8_t isPressed;
    int start_time;
}Lcd_Record;

extern uint8_t Press_Num;

extern unsigned char BTK05_ATKeyDataPack[8];
extern unsigned char g_myKeyBoard_DataWaitForUploadFlag;

extern KeyState_enumTypedef myKeyBoard_KeyState[6][5];
extern KeyState_enumTypedef myKeyBoard_KeyState_Pre[6][5];
extern KeyState_enumTypedef LCD_KeyState[6][5];

extern const char * myKeyBoard_KeyMap[6][5];

void Hong_Function();
void myKeyBoard_UpdataATDataPack();
void myKeyBoard_KeyScan();
void myKeyBoard_JudgeKeyStateChange();
void myKeyBoard_ControlKeyProcess_LeftHand(uint8_t rowi,uint8_t colj);
void myKeyBoard_KeyScan_rowScan(GPIO_TypeDef * col_GPIOPort, uint8_t col_GPIOPin_Index,const uint16_t * p_col_GPIOPin);
void myKeyBoard_ScanKeyAndUpdataATBuffer();
void myKeyBoard_ControlKeyProcess_Project(uint8_t index);
void Switch_Mode();
void LCD_DrawImage(uint16_t x, uint16_t y, uint16_t width, uint16_t height, const uint8_t *image);

#endif //PENG_KEYBOARD_KEYBOARD_DRIVER_H
